<!DOCTYPE html>

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width" />
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
    <style>
        a {
            text-decoration: none;
        }
    </style>
	{% block head %}
	{% endblock %}
</head>

<body class="container-fluid">
    <header>
        <nav class="navbar navbar-expand-md navbar-light bg-light rounded" aria-label=" navbar">
            <div class="container-fluid">
                <a class="navbar-brand" href="/">LookeLooke.com</a>
                <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
                    data-bs-target="#navbarsExample09" aria-controls="navbarsExample09" aria-expanded="false"
                    aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <div class="collapse navbar-collapse row" id="navbarSupportedContent">
                    {% if user.is_authenticated %}
                    <div class="dropdown text-end">
                        <button class=" btn dropdown-toggle" id="dropdownUser1" data-bs-toggle="dropdown"
                            aria-expanded="false">
                            我的
                        </button>
                        <ul class="dropdown-menu text-small dropdown-menu-end" aria-labelledby="dropdownUser1">
                            <li><a class="dropdown-item" href="/user/{{user.id}}">主页</a></li>
                            <li>
                                <hr class="dropdown-divider">
                            </li>
                            <li><a class="dropdown-item" href="/logout">退出登录</a></li>
                        </ul>
                    </div>
                    {% else %}
                    <ul class="nav justify-content-end">
                        <li class="nav-item">
                            <a class="btn btn-outline-secondary me-2" aria-current="page" href="/login">登录</a>
                        </li>
                        <li class="nav-item">
                            <a class="btn btn-secondary" href="/register">注册</a>
                        </li>
                    </ul>
                    {% endif %}
                </div>
            </div>
        </nav>
    </header>

    <main>
        {% block main %}
        {% endblock %}
    </main>

    <footer>
        <hr class="mt-5" />
        <div class="row">
            <div class="col-md-8 mx-auto">
                <span class="link-secondary mx-1">© 2021 <a class="link-secondary"
                        href="https://lookelooke.com">LookeLooke.com</a> All Rights
                    Reserved.</span>
                <span class="mx-1">备案号：<a class="link-secondary"
                        href="https://beian.miit.gov.cn/">闽ICP备15012号-1</a></span>
                <a class="link-secondary mx-1" href="#">关于我们</a>
                <a class="link-secondary mx-1" href="#">意见反馈</a>
            </div>
        </div>
    </footer>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous">
        </script>
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"
        integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
	{% block script %}
	{% endblock %}
</body>

</html>